package com.graduation.vaccine.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.vaccine.dto.DropDownBoxDTO;
import com.graduation.vaccine.dto.VaccineCatalogDTO;
import com.graduation.vaccine.dto.VaccineCatalogMoreDTO;
import com.graduation.vaccine.pojo.VaccineCatalog;
import com.graduation.vaccine.vo.AddVaccineCatalogVo;
import com.graduation.vaccine.vo.UpdateCatalogVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ZhaoJunYao
 * @since 2022-04-20
 */
@Mapper
public interface VaccineCatalogMapper extends BaseMapper<VaccineCatalog> {

    /**
     * 首页展示疫苗列表
     * @return
     */
    List<VaccineCatalogDTO> getAll();

    /**
     * 类别列表
     * @return
     */
    List<VaccineCatalogMoreDTO> getMoreAll();

    //web-系统管理员添加类别
    int addOne(AddVaccineCatalogVo addVaccineCatalogVo);

    //根据名称返回catalog
    VaccineCatalog getCatalogByName(String name);

    int updateCatalog(UpdateCatalogVo updateCatalogVo);

    List<DropDownBoxDTO> getDropDownBox();
}
